package one.stand.controller;

import one.stand.model.FinanceModel;
import one.stand.model.ResultModel;
import one.stand.request.AdminRecordRequest;
import one.stand.request.AdminRequest;
import one.stand.request.FinanceRequest;
import one.stand.request.NoticeRequest;
import one.stand.response.AdminResponse;
import one.stand.response.NoticeResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 企业公告管理
 *
 * @author Administrator
 */
@RestController
@RequestMapping("notice")
public class NoticeController extends BaseController {

    /**
     * 查询企业公告列表
     *
     * @param request
     * @return
     */
    @PostMapping("selectNoticeList")
    public ResultModel<Map<String, Object>> selectNoticeList(@RequestBody NoticeRequest request) {
        return noticeService.selectNoticeList(request);
    }

    /**
     * 查询企业公告信息
     *
     * @param request
     * @return
     */
    @PostMapping("getNoticeInfo")
    public ResultModel<NoticeResponse> getNoticeInfo(@RequestBody NoticeRequest request) {
        return noticeService.getNoticeInfo(request);
    }

    /**
     * 新增/修改企业公告
     *
     * @param request
     * @return
     */
    @PostMapping("insertNotice")
    public ResultModel<Boolean> insertNotice(@RequestBody NoticeRequest request) {
        return noticeService.insertNotice(request);
    }

    /**
     * 删除企业公告
     *
     * @param request
     * @return
     */
    @PostMapping("delNotice")
    public ResultModel<Boolean> delNotice(@RequestBody NoticeRequest request) {
        return noticeService.delNotice(request);
    }
}
